#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QIODevice>
#include <QSettings>
#include <QAbstractSocket>
namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

    int curHash;
    QMap<int,QByteArray> mapa;
    QSettings *settings;
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
signals:
    void answer(int hash, QString text);
    void newQuestion();
    void connectEd(QString);
    void proxySwitched(bool, QString, int);
public slots:
    void display(int hash, QIODevice* socket);
    void display(int hash, QByteArray picData);
    void clicked();
    void connErr(QAbstractSocket::SocketError);
    void useProxy(int);


private slots:
    void on_connectButton_clicked();
};

#endif // MAINWINDOW_H
